<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //就是获取数组中的元素方式变了
        let arr = [1, 3, 4, 5, 6]
        let [a, b, c, d, e] = arr;
        let [, f, g] = arr;
        let [h, ...rest] = arr;  //此时rest是一个数组
        console.log(rest);
    </script>
</body>

</html>